import axios from '@/utils/request'

/* 宽带信号采集设备相关API  */
// 设备参数、状态查询
export function getParamsAPI (params) {
  return axios({
    url: '/config/getWorkingParameters',
    method: 'get',
    params
  })
}

// 获取温度电压信息
export function getDeviceInfoAPI (params) {
  return axios({
    url: '/config/stateDisplay',
    method: 'get',
    params
  })
}

// 开始采集、参数下发接口
export function startCollectAPI (data) {
  return axios({
    url: '/config/startCollect',
    method: 'post',
    data
  })
}

// 停止采集接口
export function stopCollectAPI (data) {
  return axios({
    url: '/config/stopCollect',
    method: 'post',
    data
  })
}

// 存储参数查询
export function getSaveConfigAPI (data) {
  return axios({
    url: '/config/querySaveConfig',
    method: 'post',
    data
  })
}

// 开始存储接口
export function startSaveAPI (data) {
  return axios({
    url: '/config/startSave',
    method: 'post',
    data
  })
}

// 停止存储接口
export function stopSaveAPI (data) {
  return axios({
    url: '/config/stopSave',
    method: 'post',
    data
  })
}

// 配置存储阈值
export function setThresholdValueAPI (params) {
  return axios({
    url: '/config/setThresholdValue',
    method: 'post',
    params
  })
}

// 查询历史数据
export function getHistoryListAPI (params) {
  return axios({
    url: '/config/filePageSelect',
    method: 'get',
    params
  })
}

// 导出历史数据
export function exportFileAPI (data) {
  return axios({
    url: '/config/fileDownload',
    method: 'post',
    data
  })
}

// 持久化存储瀑布图Y轴区间
export function setPubuMapAPI (data) {
  return axios({
    url: '/config/setPubuMap',
    method: 'post',
    data
  })
}

// 查案文件列表
export function getFileListAPI (params) {
  return axios({
    url: '/config/list',
    method: 'get',
    params
  })
}
